
module  uvstructinfo.check ;

import 
	uvstructinfo.type,
	uvstructinfo.data
	;
	
import 
	std.algorithm,
	std.array,
	std.conv,
	std.stdio;

import
	tango.io.device.Array,
	tango.stdc.stringz,
	tango.io.Stdout ,
	
	tango.math.random.Random,
	tango.net.device.Berkeley,
	tango.net.InternetAddress,
	tango.net.InternetAddress,
	Int	= tango.text.convert.Integer ,
	tango.core.Array ,
	tango.io.device.Array ,
	tango.io.device.File ;
	
alias File	= tango.io.device.File.File ;


void main(){
	auto list = getuvstructinfo();
	
	foreach( it; list ) {
		bool passed	= true ;
		if( it.c_size != it.d_size ) {
			passed	= false ;
		}
		foreach(ptr; it.fields ) {
			if( ptr.c_size != ptr.d_size || ptr.c_off != ptr.d_off ) {
				passed	= false ;
				break ;
			}
		}
		if( passed ) {
			continue ;
		}
		writefln("%s:	%d:%d",  it.name,  it.c_size, it.d_size );
		foreach( ptr; it.fields ) {
			if( ptr.c_size == ptr.d_size  && ptr.c_off == ptr.d_off ) {
				writefln("\t%s:	%d:%d, %d:%d",   ptr.name ,  ptr.c_size, ptr.d_size,  ptr.c_off, ptr.d_off );
				continue ;
			}
			writefln(":\t%s:	%d:%d, %d:%d			%s",   ptr.name,  ptr.c_size, ptr.d_size,  ptr.c_off, ptr.d_off, ptr.type);
		}
		writefln("");
	}
}